<?php if(false) {?>
<link rel="stylesheet" rev="stylesheet" href="../../../images/admincp/style.css" type="text/css" media="all" />
<?php }?>
<?php include $this->header();?>
<style type="text/css">
.form-textarea, .form-text { width:250px;}
.ui-form-center { width:260px;}
</style>

<form method="post" enctype="application/x-www-form-urlencoded" onsubmit="return Validator.Validate(this)">
  <div class="mt bd p1">
    <ul class="tabs">
        <?php foreach($optionTyps as $optionTyp) {?>
        <li><a href="#" id="tab-<?=$optionTyp['option_type']?>"><?=$optionTyp['option_type_name']?></a></li>
        <?php }?>
    </ul>
    <div class="panes">
        <?php 
        foreach($optionTyps as $optionTyp) {
            $form = new UE_Form();
            $form->setHasFormTag(false);
                    
            foreach($settings as $setting) {
                if($setting['option_type'] == $optionTyp['option_type']) {
                    $element['type']    = $setting['option_input_type'];
                    $element['name']    = $setting['option_name'];
                    $element['title']   = $setting['option_title'];
                    $element['desc']    = $setting['option_note'];
                    $element['value']   = $setting['option_value'];
                    $element['values']  = $setting['option_values'];
                    $element['rows']    = $setting['option_display_line'];
                    //$element['required'] = $setting['option_is_required'];
                    //$element['msg'] = $setting['option_msg'];
                    
                    $form->addElement($element);
                    $element = array();
                }
            }
            //print_r($form);
            print $form->getHtml(3);
        }
        ?>
    </div>

    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="rank">
        <tr>
            <td width="150" align="right" class="nobd">&nbsp;</td>
            <td class="nobd"><input type="submit" class="btn" value="确定修改" /> <input type="reset" class="btn" value="重置表单" /></td>
            <td class="nobd">&nbsp;</td>
        </tr>
    </table> 
  </div>
</form>

<?php include $this->footer();?>
